﻿using GeneralServices.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WpfApplication1.TestValid
{
    public class DTOTypeTask : IDTO
    {
        #region Attributs
        private int _Id;
        private Nullable<int> _R;
        private Nullable<int> _G;
        private Nullable<int> _B;
        private string _Libelle;

        #endregion

        #region Property

        public int Id
        {
            get { return _Id; }
            set
            {
                _Id = value;
                OnPropertyChanged("Id");
            }
        }

        public Nullable<int> R
        {
            get { return _R; }
            set
            {
                _R = value;
                OnPropertyChanged("R");
            }
        }

        public Nullable<int> G
        {
            get { return _G; }
            set
            {
                _G = value;
                OnPropertyChanged("G");
            }
        }

        public Nullable<int> B
        {
            get { return _B; }
            set
            {
                _B = value;
                OnPropertyChanged("B");
            }
        }

        public string Libelle
        {
            get { return _Libelle; }
            set
            {
                _Libelle = value;
                OnPropertyChanged("Libelle");
            }
        }
        

        #endregion

        #region IDTO
        public T GetObject<T>(object param) where T : class
        {
            throw new NotImplementedException();
        }

        public void SetObject<T>(T t, object param) where T : class
        {
            throw new NotImplementedException();
        }
        #endregion

        #region NotifyPropertyChanged

        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        protected void OnPropertyChanged(String name)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(name));
        }
        #endregion

        #region ISerializableCSV
        public List<object> exposeAttributes()
        {
            return null;
        }

        public string exposeHeader(string separateur)
        {
            return "";
        }

        public bool importAttributes(string[] data)
        {
            return true;
        }
        #endregion
    }
}
